package oa.hleast.xswl.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum DisplayEnum {

    /**
     * 0：不显示，1：显示
     */
    NOT(0, "不显示"),
    YES(1, "显示");
    private int code;
    private String name;

    public static DisplayEnum getEnum(String enumName) {
        for (DisplayEnum value : DisplayEnum.values()) {
            if (value.name.equals(enumName)) {
                return value;
            }
        }
        return null;
    }
}
